From 3c8f98ff35f452a07202c26a9a52d7b2136c5ec9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 2 Sep 2006 19:29:11 +0000 Subject: [PATCH] add usb-serial and ppp fixes from jr SVN-Revision: 4732 --- .../generic/219-usbserial_buffer.patch | 21 ++++++++++ .../generic/220-usbserial_3g_cards.patch | 38 +++++++++++++++++++ .../generic/221-ppp_kfree_skb_fix.patch | 11 ++++++ 3 files changed, 70 insertions(+) create mode 100644 openwrt/target/linux/linux-2.4/patches/generic/219-usbserial_buffer.patch create mode 100644 openwrt/target/linux/linux-2.4/patches/generic/220-usbserial_3g_cards.patch create mode 100644 openwrt/target/linux/linux-2.4/patches/generic/221-ppp_kfree_skb_fix.patch diff --git a/openwrt/target/linux/linux-2.4/patches/generic/219-usbserial_buffer.patch b/openwrt/target/linux/linux-2.4/patches/generic/219-usbserial_buffer.patch new file mode 100644 index 0000000000..f929b502c8 --- /dev/null +++ b/openwrt/target/linux/linux-2.4/patches/generic/219-usbserial_buffer.patch @@ -0,0 +1,21 @@ +--- linux.old/drivers/usb/serial/usbserial.c 2006-08-19 18:48:07.000000000 +0200 ++++ linux.dev/drivers/usb/serial/usbserial.c 2006-08-19 18:46:02.000000000 +0200 +@@ -1359,7 +1359,7 @@ + wake_up_interruptible(&tty->write_wait); + } + +- ++#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + static void * usb_serial_probe(struct usb_device *dev, unsigned int ifnum, + const struct usb_device_id *id) + { +@@ -1512,7 +1512,8 @@ + err("No free urbs available"); + goto probe_error; + } +- buffer_size = endpoint->wMaxPacketSize; ++ /* Minimum buffer size for EVDO and HSDPA cards */ ++ buffer_size = MIN(2048,endpoint->wMaxPacketSize); + port->bulk_in_endpointAddress = endpoint->bEndpointAddress; + port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL); + if (!port->bulk_in_buffer) { diff --git a/openwrt/target/linux/linux-2.4/patches/generic/220-usbserial_3g_cards.patch b/openwrt/target/linux/linux-2.4/patches/generic/220-usbserial_3g_cards.patch new file mode 100644 index 0000000000..4f712e7ea9 --- /dev/null +++ b/openwrt/target/linux/linux-2.4/patches/generic/220-usbserial_3g_cards.patch @@ -0,0 +1,38 @@ +--- linux/drivers/usb/serial/usbserial.c.old 2006-05-15 18:16:55.000000000 +0300 ++++ linux/drivers/usb/serial/usbserial.c 2006-05-15 18:19:06.000000000 +0300 +@@ -332,7 +332,7 @@ + static __u16 vendor = 0x05f9; + static __u16 product = 0xffff; + +-static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */ ++static struct usb_device_id generic_device_ids[8]; /* Initially all zeroes. */ + + /* All of the device info needed for the Generic Serial Converter */ + static struct usb_serial_device_type generic_device = { +@@ -1793,6 +1793,26 @@ + generic_device_ids[0].idVendor = vendor; + generic_device_ids[0].idProduct = product; + generic_device_ids[0].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; ++ /* Option 3G/UMTS 'Colt' */ ++ generic_device_ids[1].idVendor = 0x0af0; ++ generic_device_ids[1].idProduct = 0x5000; ++ generic_device_ids[1].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; ++ /* Option 3G/UMTS 'Fusion' */ ++ generic_device_ids[2].idVendor = 0x0af0; ++ generic_device_ids[2].idProduct = 0x6000; ++ generic_device_ids[2].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; ++ /* Option 3G/UMTS 'Fusion2' */ ++ generic_device_ids[3].idVendor = 0x0af0; ++ generic_device_ids[3].idProduct = 0x6300; ++ generic_device_ids[3].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; ++ /* Huawei E600 */ ++ generic_device_ids[4].idVendor = 0x12d1; ++ generic_device_ids[4].idProduct = 0x1001; ++ generic_device_ids[4].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; ++ /* Audiovox Aircard */ ++ generic_device_ids[5].idVendor = 0x0f3d; ++ generic_device_ids[5].idProduct = 0x0112; ++ generic_device_ids[5].match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT; + /* register our generic driver with ourselves */ + usb_serial_register (&generic_device); + #endif diff --git a/openwrt/target/linux/linux-2.4/patches/generic/221-ppp_kfree_skb_fix.patch b/openwrt/target/linux/linux-2.4/patches/generic/221-ppp_kfree_skb_fix.patch new file mode 100644 index 0000000000..5619f1d2a7 --- /dev/null +++ b/openwrt/target/linux/linux-2.4/patches/generic/221-ppp_kfree_skb_fix.patch @@ -0,0 +1,11 @@ +--- linux-2.4.30/drivers/net/ppp_async.c~ 2006-06-16 22:41:01.000000000 +0300 ++++ linux-2.4.30/drivers/net/ppp_async.c 2006-06-16 22:41:01.000000000 +0300 +@@ -624,7 +624,7 @@ + *buf++ = PPP_FLAG; + ap->olim = buf; + +- kfree_skb(ap->tpkt); ++ dev_kfree_skb_any(ap->tpkt); + ap->tpkt = 0; + return 1; + } -- 2.30.2